﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace hissql
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            /*string connString =Data Source=local;database=hissql;Integrated Security=SSPI*/
            
           SqlConnection connection = new SqlConnection("Server=(local);Integrated Security=SSPI;database=hissql");
            try
            {
                connection.Open();
                MessageBox.Show("成功");
                System.Diagnostics.Process.Start("Register.cs");

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());

            }
            finally
            {
                connection.Close();
                MessageBox.Show("关闭成功");
            }
        }
    }
}
